<%@page language="java" pageEncoding="GBK"%>    
<%@page contentType="text/html; charset=gbk"%>
<%@page import="java.io.*"%>
<%@page import="java.net.*"%>
<%           
             request.setCharacterEncoding("UTF-8");
            String dbname = (request.getParameter("DBName")==null?"":request.getParameter("DBName"));
            String runid = (request.getParameter("RunID")==null?"":request.getParameter("RunID"));
            String runname = (request.getParameter("RunName")==null?"":java.net.URLEncoder.encode(request.getParameter("RunName"),"GBK"));
            String runparam = (request.getParameter("RunParam")==null?"":request.getParameter("RunParam"));
            
            runname = URLDecoder.decode(runname,"UTF-8");
            //runparam = URLDecoder.decode(runparam,"UTF-8");
            
            //runname = URLDecoder.decode(runname);
            //runname = new String(runname.getBytes("ISO-8859-1"),"GBK");
            
            
           // dbname="SNAD";
            //runid="SNAD_CCZTFX";
            //runname="%e6%88%90%e6%9e%9c%e4%ba%a7%e5%87%ba%e7%8a%b6%e6%80%81%e5%88%86%e6%9e%90";
            //runparam="SYS_VSM%3d%e8%94%ac%e8%8f%9c%e9%a3%9f%e5%93%81%3a4421%2c%e5%ae%89%e5%85%a8%e7%94%9f%e4%ba%a7%3a4378%2c%e5%af%b9%e7%ad%96%e7%a0%94%e7%a9%b6%3a4336%2c%e5%9c%9f%e5%a3%a4%e9%9a%9c%e7%a2%8d%e5%9b%a0%e7%b4%a0%3a4251%2c%e5%ae%89%e5%85%a8%e9%9a%90%e6%82%a3%3a2875%2c%e9%80%80%e5%8c%96%e5%9c%9f%e5%a3%a4%3a2234%2c%e7%9b%b8%e7%bb%93%e5%90%88%3a2016%2c%e8%8f%9c%e5%9c%b0%e5%9c%9f%e5%a3%a4%3a849%2c%e5%9c%9f%e5%a3%a4%e8%82%a5%e5%8a%9b%e9%80%80%e5%8c%96%3a815%2c%e5%af%8c%e8%90%a5%e5%85%bb%e5%8c%96%e6%b1%a1%e6%9f%93%3a810%2c%e6%b4%bb%e5%8a%9b%3a806%2c%e5%bc%80%e5%8f%91%e7%a0%94%e5%88%b6%3a802%2c%e6%81%a2%e5%a4%8d%3a757%2c%e8%af%be%e9%a2%98%e7%a0%94%e7%a9%b6%3a719%2c%e6%9c%89%e5%ae%b3%e7%89%a9%e8%b4%a8%3a692%2c%e7%94%9f%e7%89%a9%e6%b4%bb%e6%80%a7%e5%89%82%3a689%2c%e8%94%ac%e8%8f%9c%e5%9c%b0%3a677%2c%e6%bc%94%e5%8f%98%e6%9c%ba%e5%88%b6%3a649%2c%e7%8e%b0%e7%8a%b6%e8%b0%83%e7%a0%94%3a637%2c%e7%94%9f%e4%ba%a7%e4%b8%8e%e5%8f%91%e5%b1%95%3a631%24%e4%b8%ad%e5%9b%be%e5%88%86%e7%b1%bb%e5%8f%b71%3dS63%24%e7%ac%ac%e4%b8%80%e5%ae%8c%e6%88%90%e5%8d%95%e4%bd%8d%3d%e4%ba%91%e5%8d%97%e5%b8%88%e8%8c%83%e5%a4%a7%e5%ad%a6%24%e6%88%90%e6%9e%9c%e5%ae%8c%e6%88%90%e4%ba%ba%3d%e5%ae%98%e4%bc%9a%e6%9e%97%3b%e5%bc%a0%e4%b8%ad%e5%ae%81%3b%e9%a9%ac%e9%9b%aa%e6%b6%9b%3b%e4%bb%87%e6%98%8e%e5%8d%8e%3b%e5%bc%a0%e9%9c%81%e7%8f%a9%3b%e9%87%91%e6%b0%b8%e9%92%a7%3b%e7%8e%8b%e6%98%a5%e6%99%93%3b%e8%ae%b8%e5%b9%bf%3b%e5%bc%a0%e5%85%b4%e6%85%88%24%e7%bc%96%e5%8f%b7%3d57669";
            
            
            
            
            String param = "?DBName="+dbname+"&RunID="+runid+"&RunName="+runname+"&RunParam="+runparam;
            System.out.println("param");
            
            
            
            
            if(param == null)
            {
               out.println("");
               return;
            }
            URL    url = null; 
            String tfscriptObj = "";
            try{
                url = new URL("http://168.160.236.23/Grid2008/Unis/GetFieldInfoReturnToCN.aspx"+param);
                System.out.println(url.toString());
            }catch(MalformedURLException e){
                System.err.println(e.toString());
                out.println("");
            }
            try{
                InputStream ins = url.openStream();
              //  BufferedReader breader = new BufferedReader(new InputStreamReader(ins));
                BufferedReader breader = new BufferedReader(new InputStreamReader(ins,"utf-8"));
                String info = breader.readLine();                       
                while(info != null){
                    tfscriptObj += info;
                    System.out.println(info);
                    info  = breader.readLine();
                }
                 out.println(tfscriptObj);            
            } catch(IOException e){
                out.println("");
            }
            
%>